package persistence;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the Firm_has_Address database table.
 * 
 */
@Entity
public class Firm_has_Address implements Serializable {
	private static final long serialVersionUID = 1L;
	private Firm_has_AddressPK id;
	private byte isFilling;
	private Firm firm;
	private Firm_Address firmAddress;

    public Firm_has_Address() {
    }


	@EmbeddedId
	public Firm_has_AddressPK getId() {
		return this.id;
	}

	public void setId(Firm_has_AddressPK id) {
		this.id = id;
	}
	

	public byte getIsFilling() {
		return this.isFilling;
	}

	public void setIsFilling(byte isFilling) {
		this.isFilling = isFilling;
	}


	//bi-directional many-to-one association to Firm
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="Firm_crd", referencedColumnName="crd",insertable=false,updatable=false),
		@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm",insertable=false,updatable=false)
		})
	public Firm getFirm() {
		return this.firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}
	

	//bi-directional many-to-one association to Firm_Address
    @ManyToOne
	@JoinColumn(name="Address_idCitState",insertable=false,updatable=false)
	public Firm_Address getFirmAddress() {
		return this.firmAddress;
	}

	public void setFirmAddress(Firm_Address firmAddress) {
		this.firmAddress = firmAddress;
	}
	
}